package com.paper.tiger.easy.rpc.s.client.registy.service;

import com.alibaba.fastjson.JSON;
import com.paper.tiger.easy.rpc.core.RegisterData;
import com.paper.tiger.easy.rpc.s.client.registy.common.ServiceMessageData;
import com.paper.tiger.easy.rpc.s.client.registy.handler.ClientServiceHandler;
import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * [简要描述]: 查询响应
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/6/16 15:42
 * @since JDK 1.8
 */
public class OffLineServiceImpl implements RespService
{
    private static Logger logger = LoggerFactory.getLogger(OffLineServiceImpl.class);

    @Override
    public void service(ChannelHandlerContext ctx, RegisterData data)
    {
        logger.info("收到服务器下线消息，下线信息为：{}", JSON.toJSONString(data));
        ServiceMessageData.remove(data,ctx.channel());

    }
}
